using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using TreeSharp;

namespace FelMaster.Classes.Warrior
{
    class Prot : TalentBase
    {
        public override string Name
        {
            get { return "Prot Warrior 1.1"; }
        }

        public override string KeySpell
        {
            get { return "Shield Slam"; }
        }

        public override Composite SingleRotation
        {
            get {
                return new PrioritySelector(
                    new Decorator(x => SC.PlayerIsChanneling, new TreeSharp.Action(a => SC.Log("Channeling"))),
                    SC.UseEngineerGloves(a => true, "Engineer's glove enchant"),
                    SC.CastSpell("Blood Fury", a => true, "Blood Fury"),
                    SC.CastSpell("Lifeblood", a => true, "Lifeblood"),
                    SC.CastSpell("Berserking", a => true, "Berserking"),
                    SC.CastSpell("Commanding Shout", a => true, "Commanding Shout"),
                    SC.CastSpell("Berserker Rage", a => !SC.PlayerHasBuff("Enraged Regeneration"), "Berserker Rage"),
                    SC.CastSpell("Victory Rush", a => Me.HealthPercent < 80, "Victory Rush"),
                    SC.CastDebuff("Rend", a => true, "Rend"),
                    SC.CastSpell("Shield Slam", a => SC.PlayerHasBuff("Shield Block"), "Shield Slam"),
                    SC.CastSpell("Shield Slam", a => SC.PlayerHasBuff("Sword and Board"), "Shield Slam"),
                    SC.CastSpell("Thunder Clap", a => true, "ThunderClap"),
                    SC.CastSpell("Revenge", a => true, "Revenge"),
                    SC.CastSpell("Shield Slam", a => true, "Shield Slam"),
                    SC.CastSpell("Shockwave", a => true, "Shockwave"),
                    SC.CastSpell("Devastate", a => true, "Devastate"),
                    SC.CastAreaSpell("Cleave", 8, false, 2, 0.0, 0.0, ret => Me.RagePercent > 40, "Cleave"),
                    SC.CastSpell("Heroic Strike", a => Me.RagePercent > 40, "Heroic Strike"),
                    SC.CastSpell("Inner Rage", a => Me.RagePercent > 70, "Inner Rage")
                );
            }
        }

        public override Composite Buffs
        {
            get
            {
                return new PrioritySelector(
                    //XXX put your buff rotation here!
                );
            }
        }

        public override Composite PVPRotation
        {
            get { throw new NotImplementedException(); }
        }

        public override Composite PVERotation
        {
            get
            {
                return SingleRotation;
            }
        }
    }
}